<?php

namespace Modules\Common\Models;

use Modules\Common\Models\Validation\UsersValidation;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;
class Users extends Authenticatable implements JWTSubject
{
    protected $connection = 'platform';
    protected $table ="customer";
    use UsersValidation;
    // 实现 JWTSubject 接口的方法
    public function getJWTIdentifier()
    {
        return $this->getKey();
    }

    public function getJWTCustomClaims()
    {
        return [];
    }

    public function members()
    {
        return $this->hasMany(Members::class, 'user_id');
    }
    
    public function orders()
    {
        return $this->hasMany(Orders::class, 'user_id');
    }
}